#!/bin/bash
USER="root"
PASSWORD="12345678"
PREFIX="position_info_v2_"
dbName="position_info"
# 数据库分割后的文件路径
SQLPATH="/Users/sumscope/Desktop/SQLDumpSplitterResult/"

# 先手动创建 position_info 数据库

# 执行创建表的sql文件
mysql -u$USER -p$PASSWORD $dbName<$SQLPATH/${PREFIX}DataStructure.sql

# 执行插入数据的sql文件
for i in {1..732};do
echo "正在导入第${i}个sql文件"
mysql -u$USER -p$PASSWORD $dbName<$SQLPATH/${PREFIX}$i.sql
done

